package org.example.travel_web.dto.route;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import java.util.List;

@Data
public class RouteReq {
    /**
     * 路线 ID
     */
    @Schema(description = "路线 ID")
    private Integer routeId;

    /**
     * 路线标题
     */
    @Schema(description = "路线标题")
    @NotBlank(message = "标题不能为空")
    private String title;

    /**
     * 路线简要描述
     */
    @Schema(description = "路线简要描述")
    @NotBlank(message = "简要描述不能为空")
    private String description;

    /**
     * 所属分类 ID
     */
    @Schema(description = "所属分类 ID")
//    @NotNull(message = "所属分类不能为空")
    private Integer categoryId;

    /**
     * 推荐指数 1 - 5
     */
    @Schema(description = "推荐指数 1 - 5")
    @NotNull(message = "推荐指数不能为空")
    @Range(min = 1, max = 5, message = "推荐指数范围 1 - 5")
    private Integer recRate;

    /**
     * 总天数
     */
    @Schema(description = "总天数")
    @NotNull(message = "总天数不能为空")
    @Min(value = 1, message = "总天数不能小于 1")
    private Integer days;

    /**
     * 行程特色
     */
    @Schema(description = "行程特色")
    @NotBlank(message = "行程特色不能为空")
//    @Max(value = 350, message = "行程特色不能超过 350 字")
    private String special;
    /**
     * 封面
     */
    @Schema(description = "封面")
    private String pic;

    /**
     * 图片
     */
    @Schema(description = "图片")
    private String images;

    @Schema(description = "详细介绍")
    private String content;
    @Schema(description = "目的地")
    @NotBlank(message = "目的地不能为空")
    private String destination;

    @Schema(description = "行程安排详细内容 数量和天数一致")
    private List<Detail> details;
}
